<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>学生管理</title>

    <%@ include file="base.jsp" %>

    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="css/x-admin.css" media="all">
    <link rel="stylesheet" href="css/pag.css" media="all">
    <link rel="stylesheet" href="css/query.css" media="all">

    <script src="js/jquery-3.6.0.js"></script>
    <script>
        $(function () {
            $('#sub').change(function () {
                var suid = $('#sub').val();
                location.href = "<%=request.getContextPath()%>/teacher/teacherOwnController?fun=stus&suid=" + suid;
            })
        })
    </script>
</head>

<body>
<div class="x-nav"><span class="layui-breadcrumb"> <a><cite>学生管理</cite></a> <a><cite>查看本班学生</cite></a> </span> <a
        class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
        href="teacher/teacherOwnController?fun=ownstu" title="刷新"><i class="layui-icon"
                                                                     style="line-height:30px">ဂ</i></a></div>
<div class="x-body">
    <select name="sub" id="sub" class="layui-form">
        <option value="-1">请选择您教授的课程</option>
        <c:forEach var="i" items="${data}">
            <option <c:if test="${suidSidRespVo.suid == i.suid}">selected</c:if>
                    value="${i.suid}">${i.suname}</option>
        </c:forEach>
    </select>
    <div>当前班级学生总数：${suidSidRespVo.students.size()}</div>
    <table class="tablelist">
        <thead>
        <tr>
            </th>
            <th> 学生学号</th>
            <th> 学生姓名</th>
            <th> 学生性别</th>
            <th> 所属专业</th>
        </tr>
        </thead>
        <tbody id="x-link">
        <c:forEach var="i" items="${suidSidRespVo.students}">
            <tr>
                <td>${i.sid}</td>
                <td>${i.sname}</td>
                <td>${i.ssex}</td>
                <td>${i.zname}</td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
</div>

<br/>
<br/>
<br/>
<script src="./lib/layui/layui.js" charset="utf-8"></script>
<script src="./js/x-layui.js" charset="utf-8"></script>

<script src="js/jquery2.js" charset="utf-8"></script>
<script src="js/js.js" charset="utf-8"></script>
</body>

</html>